package com.itboye.api.model;

import com.itboye.system.crypt.JsonCrypt;

import java.util.HashMap;

/**
 * Created by hebidu on 16/7/18.
 */
public class ByInnerResponseData {

    public ByInnerResponseData(String code,Object data,String notifyId){
        this.code = code;
        this.data = data;
        this.notifyId = notifyId;
    }

    private String code;
    private Object data;
    private String notifyId;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public String getNotifyId() {
        return notifyId;
    }

    public void setNotifyId(String notifyId) {
        this.notifyId = notifyId;
    }

    /**
     * 转换成json字符串
     * @return
     */
    public String toJson(){
        HashMap<String,Object> params = new HashMap<String,Object>();
//        String jsonData = JsonCrypt.toJson(data);
        params.put("code",code);
        params.put("data",data);
        params.put("notify_id",notifyId);
        return JsonCrypt.toJson(params);
    }

}
